package com.jkt.rms.business.base;

import java.lang.Comparable;
import java.io.Serializable;


/**
 * This is an object that contains data related to the resource_role_linkup table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="resource_role_linkup"
 */

public abstract class BaseResourceRoleLinkup  implements Comparable, Serializable {

	public static String REF = "ResourceRoleLinkup";
	public static String PROP_UPDATED_DATE = "updatedDate";
	public static String PROP_UPDATED_BY = "updatedBy";
	public static String PROP_EFF_END_DATE = "effEndDate";
	public static String PROP_EFF_START_DATE = "effStartDate";
	public static String PROP_RESOURCE_ROLE_LINKUP_ID = "resourceRoleLinkupId";
	public static String PROP_RESOURCE_ID = "resourceId";
	public static String PROP_ROLE_ID = "roleId";


	// constructors
	public BaseResourceRoleLinkup () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseResourceRoleLinkup (int resourceRoleLinkupId) {
		this.setResourceRoleLinkupId(resourceRoleLinkupId);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private int resourceRoleLinkupId;

	// fields
	private int resourceId;
	private java.lang.Long roleId;
	private java.util.Date effStartDate;
	private java.util.Date effEndDate;
	private java.lang.String updatedBy;
	private java.util.Date updatedDate;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="resource_role_linkup_id"
     */
	public int getResourceRoleLinkupId () {
		return resourceRoleLinkupId;
	}

	/**
	 * Set the unique identifier of this class
	 * @param resourceRoleLinkupId the new ID
	 */
	public void setResourceRoleLinkupId (int resourceRoleLinkupId) {
		this.resourceRoleLinkupId = resourceRoleLinkupId;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: resource_id
	 */
	public int getResourceId () {
		return resourceId;
	}

	/**
	 * Set the value related to the column: resource_id
	 * @param resourceId the resource_id value
	 */
	public void setResourceId (int resourceId) {
		this.resourceId = resourceId;
	}



	/**
	 * Return the value associated with the column: role_id
	 */
	public java.lang.Long getRoleId () {
		return roleId;
	}

	/**
	 * Set the value related to the column: role_id
	 * @param roleId the role_id value
	 */
	public void setRoleId (java.lang.Long roleId) {
		this.roleId = roleId;
	}



	/**
	 * Return the value associated with the column: eff_start_date
	 */
	public java.util.Date getEffStartDate () {
		return effStartDate;
	}

	/**
	 * Set the value related to the column: eff_start_date
	 * @param effStartDate the eff_start_date value
	 */
	public void setEffStartDate (java.util.Date effStartDate) {
		this.effStartDate = effStartDate;
	}



	/**
	 * Return the value associated with the column: eff_end_date
	 */
	public java.util.Date getEffEndDate () {
		return effEndDate;
	}

	/**
	 * Set the value related to the column: eff_end_date
	 * @param effEndDate the eff_end_date value
	 */
	public void setEffEndDate (java.util.Date effEndDate) {
		this.effEndDate = effEndDate;
	}



	/**
	 * Return the value associated with the column: updated_by
	 */
	public java.lang.String getUpdatedBy () {
		return updatedBy;
	}

	/**
	 * Set the value related to the column: updated_by
	 * @param updatedBy the updated_by value
	 */
	public void setUpdatedBy (java.lang.String updatedBy) {
		this.updatedBy = updatedBy;
	}



	/**
	 * Return the value associated with the column: updated_date
	 */
	public java.util.Date getUpdatedDate () {
		return updatedDate;
	}

	/**
	 * Set the value related to the column: updated_date
	 * @param updatedDate the updated_date value
	 */
	public void setUpdatedDate (java.util.Date updatedDate) {
		this.updatedDate = updatedDate;
	}





	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jkt.rms.business.ResourceRoleLinkup)) return false;
		else {
			com.jkt.rms.business.ResourceRoleLinkup resourceRoleLinkup = (com.jkt.rms.business.ResourceRoleLinkup) obj;
			return (this.getResourceRoleLinkupId() == resourceRoleLinkup.getResourceRoleLinkupId());
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			return (int) this.getResourceRoleLinkupId();
		}
		return this.hashCode;
	}

	public int compareTo (Object obj) {
		if (obj.hashCode() > hashCode()) return 1;
		else if (obj.hashCode() < hashCode()) return -1;
		else return 0;
	}

	public String toString () {
		return super.toString();
	}


}